package com.example.system.convert;

import com.example.system.dto.TenantDto;
import com.example.system.entity.Tenant;
import com.example.system.vo.TenantVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author 王令
 * @since 2022/10/21 19:47
 */
@Mapper
public interface TenantConvert {

    TenantConvert INSTANCE = Mappers.getMapper(TenantConvert.class);

    @Mapping(target = "deleted", ignore = true)
    @Mapping(target = "deleteTime", ignore = true)
    Tenant toTenant(TenantDto dto);

    TenantVo toTenantVo(Tenant tenant);

    List<TenantVo> toTenantVoList(List<Tenant> tenantVos);
}
